<?php
$city_id = 1;
$links = InnerLink::getLinks($city_id);
if (count($links) > 1) {
?>
<div class="inner-link">
<p class="h3">Я хочу снять</p>
<?php 
$size = count($links) / 3;
$link_chunks = $size>3 ? array_chunk($links, $size) : array(0=>$links);
foreach ($link_chunks as $chunk) {
?>
<ul>
	<?php foreach ($chunk as $ls) { ?>
	<li><?php echo CHtml::link($ls->caption, $ls->url)?></li>
	<?php }?>
</ul>
<?php } ?>
<div class="clr"></div>
</div>
<?php } ?>